
import { VuexModule, Module, Action, Mutation, getModule } from 'vuex-module-decorators';
import store from '@/store';

export enum DeviceType {
  Mobile = 'mobile',
  Desktop = 'desktop'
}

export interface IAppState {
  // device: DeviceType;
  // sidebar: {
  //   opened: boolean;
  //   withoutAnimation: boolean;
  // };
  // language: string;
  size: string;
}

@Module({ dynamic: true, store, name: 'App', namespaced: true })
class App extends VuexModule implements IAppState {
  // device = DeviceType.Desktop;
  public size = "1920"
  Authority={}
  get getterSize() {
    return this.size
  }

  @Action({ commit: 'SET_SIZE' })
  SetSize(size: string) {
    return size;
  }
  @Mutation
  private SET_SIZE(size: string) {
    this.size = size;
  }
  @Action({ commit: 'SET_Authority' })
  SetAuthority(Auth: string) {
    return Auth;
  }
  @Mutation
  private SET_Authority(Auth) {
    this.Authority = Auth;
  }
}

export const AppModule = getModule(App);
